<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.1.0.js"></script>
<script type="text/javascript">
   $(document).ready(function(){
      //alert("ready");
      $("#itemTbl tr").mouseover(function(){
         $(this).css("background","yellow");
         $(this).click(function(){
            //alert($(this).children().eq(0).text());
            var itemNo = $(this).children().eq(0).text();
            location.href="${initParam.root}item/showItemContent.moja?itemNo="+itemNo+"&memberId=${sessionScope.mvo.memberId}";
         });
      });
      $("#itemTbl tr").mouseleave(function(){
         $(this).css("background","white");
      });
   });
</script>
</head>
<body>
<div id="mainCss" align="center">
<br><br>
<table id="itemTbl" border="1" cellpadding="0" cellspacing="0">
<thead>
   <th>상품번호</th><th>상품명</th><th>상세정보</th><th>작성자</th><th>가격</th><th>업로드 날짜</th>
</thead>
<tbody>
<c:forEach items="${requestScope.list }" var="itemVO">
<tr>
   <td>${itemVO.itemNo}</td>
   <td>${itemVO.itemName}</td>
   <td>${itemVO.itemInfo}</td>
   <td>${itemVO.memberId}</td>
   <td>${itemVO.itemPrice}</td>
   <td>${itemVO.uploadDate}</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</body>
</html>